{extend name="public:base" /}
{block name="head"}
<link href="__PUBLIC__/view_res/mobile/css/wshop_company_center.css" type="text/css" rel="Stylesheet" />
<link href="__PUBLIC__/jquery-weui/dist/lib/weui.min.css" type="text/css" rel="Stylesheet" />
<link href="__PUBLIC__/view_res/mobile/css/login.css" type="text/css" rel="Stylesheet" />
<link href="__PUBLIC__/jquery-weui/dist/lib/weui.min.css" type="text/css" rel="Stylesheet" />
<link href="__PUBLIC__/jquery-weui/dist/css/jquery-weui.min.css" type="text/css" rel="Stylesheet" />
<script src="__PUBLIC__/jquery-weui/dist/js/jquery-weui.min.js"></script>

{/block} 
{block name="header"}
{include file="public/top-nav" /}
{/block}

{block name="content"}
<style>
    .ulist_p {
        width: 100%;
        padding: 2px 9px;
        display: block;
        color: #b95f5f;
        font-weight: 600;
    }
</style>
<form id="login-wrap">
    <header class="Thead">转让</header>
    {:token()}
    <div style="margin:0 10px;">
        <div class="gs-text">
            <input type="text" name="mobile" value=""  tabindex="2" placeholder="对方手机号码" />
            
        </div>
    </div>
    <div style="margin:0 10px;">
        <div class="gs-text">
            <input type="number" step="0.1" name="num" value=""  tabindex="2" placeholder="请输入转让的枚数，为0.5的倍数" />
        </div>
    </div>
    <div style="margin:0 10px;">
        <div class="gs-text">
            <input type="password" name="pwd2" value=""  tabindex="2" placeholder="请输入二级密码" />
        </div>
    </div>

<a class="button green" href="javascript:;" id="reg-btn">确认提交</a>

<header class="Thead">历史记录</header>
<div id="ulist">            
{volist name="list" id="p"}            
    <section class="ulist clearfix">
        <div>
            <span class="ulist_p">{$p.dt}</span>
            <span style="padding:0 8px;display: block;">用户：{$p.mobile}</span>
            <span style="padding:0 8px;display: block;">姓名：{$p.id_name}</span>
            <span style="padding:0 8px;display: block;">数量：{$p.num}</span>
        </div>
    </section>
{/volist}
</div>
<script>
    $('#reg-btn').click(function()
    {
        $.post(

            '{:url("MyTicket/getUserinfo")}',

            $('input[type="text"],input[type="password"],input[type="number"]'),
            function(d){
                console.log(d);
                //st = d;
                if(d.error){
                    $.toast(d.error, "forbidden");
                }else{
                    var str = d.success;
                    var str = "请确认是否转给:"+str;
                    var r=confirm(str);
                    if (r==true)
                    {
                        $.post(
                            '{:url("MyTicket/usertf")}',

                            $('input[type="text"],input[type="number"],input[type="hidden"]'),
                            function(d){
                                //alert(d.success);
                                if(d.error){
                                    $.toast(d.error, "forbidden");
                                }else if(d.success){
                                    $.toast(d.success);

                                    setTimeout(function (){
                                        window.location.href = "/mobile/MyTicket/usertf";
                                    },1000);
                                }
                            }
                        );
                    }
                }
            }
        )
    })
</script>
{/block}